import org.junit.Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Hashtable;

public class MapTest {

    @Test
    public void test1(){
        HashMap<Object, Object> map = new HashMap<>();
        map.put(null,null);
    }

    @Test
    public void test2(){
        Hashtable<Object, Object> hashtable = new Hashtable<>();
        hashtable.put(null,null);//Hashtable不能添加null。空指针异常错误
    }

}
